//
//  HomeCollectionCell.swift
//  BasketballScorer
//
//  Created by hasx on 2023/11/2.
//

import UIKit

class HomeCollectionCell: UICollectionViewCell {
    @IBOutlet weak var showImg: UIImageView!
    @IBOutlet weak var showTitle: UILabel!
    
    @IBOutlet weak var bgView: UIView!
    
    let colors = ["#FFC7C7","#C7E2FF","#FFE7C7","#E9DEFF","#FFF9E1","#F7F9EE"];
    
    override func awakeFromNib() {
        super.awakeFromNib()
        // Initialization code
        bgView.layer.cornerRadius = 10
        bgView.layer.masksToBounds = true
    }

    func updateCellUiMethod(img:String,titleStr:String,index:NSInteger){
        showImg.image = UIImage(named: img)
        showTitle.text = titleStr
        bgView.backgroundColor = UIColor.Jh_hexColor(colors[index])
    }
    
}
